3.1.12 \(\int x \sinh (\frac {1}{4}+x+x^2) \, dx\) [12]

3.1.12.1 Optimal result
3.1.12.2 Mathematica [A] (verified)
3.1.12.3 Rubi [A] (verified)
3.1.12.4 Maple [C] (verified)
3.1.12.5 Fricas [B] (verification not implemented)
3.1.12.6 Sympy [F]
3.1.12.7 Maxima [B] (verification not implemented)
3.1.12.8 Giac [C] (verification not implemented)
3.1.12.9 Mupad [F(-1)]

3.1.12.1 Optimal result

Integrand size = 11, antiderivative size = 52 \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{2} \cosh \left (\frac {1}{4}+x+x^2\right )-\frac {1}{8} \sqrt {\pi } \text {erf}\left (\frac {1}{2} (-1-2 x)\right )-\frac {1}{8} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (1+2 x)\right ) \]

output
1/2*cosh(1/4+x+x^2)+1/8*erf(1/2+x)*Pi^(1/2)-1/8*erfi(1/2+x)*Pi^(1/2)
 
3.1.12.2 Mathematica [A] (verified)

Time = 0.05 (sec) , antiderivative size = 75, normalized size of antiderivative = 1.44 \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {2 \left (1+\sqrt {e}\right ) \cosh (x (1+x))+\sqrt [4]{e} \sqrt {\pi } \text {erf}\left (\frac {1}{2}+x\right )-\sqrt [4]{e} \sqrt {\pi } \text {erfi}\left (\frac {1}{2}+x\right )+2 \left (-1+\sqrt {e}\right ) \sinh (x (1+x))}{8 \sqrt [4]{e}} \]

input
Integrate[x*Sinh[1/4 + x + x^2],x]
 
output
(2*(1 + Sqrt[E])*Cosh[x*(1 + x)] + E^(1/4)*Sqrt[Pi]*Erf[1/2 + x] - E^(1/4) 
*Sqrt[Pi]*Erfi[1/2 + x] + 2*(-1 + Sqrt[E])*Sinh[x*(1 + x)])/(8*E^(1/4))
 
3.1.12.3 Rubi [A] (verified)

Time = 0.29 (sec) , antiderivative size = 57, normalized size of antiderivative = 1.10, number of steps used = 5, number of rules used = 5, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.455, Rules used = {5905, 5897, 2664, 2633, 2634}

Below are the steps used by Rubi to obtain the solution. The rule number used for the transformation is given above next to the arrow. The rules definitions used are listed below.

\(\displaystyle \int x \sinh \left (x^2+x+\frac {1}{4}\right ) \, dx\)

\(\Big \downarrow \) 5905

\(\displaystyle \frac {1}{2} \cosh \left (x^2+x+\frac {1}{4}\right )-\frac {1}{2} \int \sinh \left (x^2+x+\frac {1}{4}\right )dx\)

\(\Big \downarrow \) 5897

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int e^{-x^2-x-\frac {1}{4}}dx-\frac {1}{2} \int e^{x^2+x+\frac {1}{4}}dx\right )+\frac {1}{2} \cosh \left (x^2+x+\frac {1}{4}\right )\)

\(\Big \downarrow \) 2664

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int e^{-\frac {1}{4} (2 x+1)^2}dx-\frac {1}{2} \int e^{\frac {1}{4} (2 x+1)^2}dx\right )+\frac {1}{2} \cosh \left (x^2+x+\frac {1}{4}\right )\)

\(\Big \downarrow \) 2633

\(\displaystyle \frac {1}{2} \left (\frac {1}{2} \int e^{-\frac {1}{4} (2 x+1)^2}dx-\frac {1}{4} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (2 x+1)\right )\right )+\frac {1}{2} \cosh \left (x^2+x+\frac {1}{4}\right )\)

\(\Big \downarrow \) 2634

\(\displaystyle \frac {1}{2} \left (\frac {1}{4} \sqrt {\pi } \text {erf}\left (\frac {1}{2} (2 x+1)\right )-\frac {1}{4} \sqrt {\pi } \text {erfi}\left (\frac {1}{2} (2 x+1)\right )\right )+\frac {1}{2} \cosh \left (x^2+x+\frac {1}{4}\right )\)

input
Int[x*Sinh[1/4 + x + x^2],x]
 
output
Cosh[1/4 + x + x^2]/2 + ((Sqrt[Pi]*Erf[(1 + 2*x)/2])/4 - (Sqrt[Pi]*Erfi[(1 
 + 2*x)/2])/4)/2
 

3.1.12.3.1 Defintions of rubi rules used

rule 2633
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erfi[(c + d*x)*Rt[b*Log[F], 2]]/(2*d*Rt[b*Log[F], 2])), x] /; FreeQ[{ 
F, a, b, c, d}, x] && PosQ[b]
 

rule 2634
Int[(F_)^((a_.) + (b_.)*((c_.) + (d_.)*(x_))^2), x_Symbol] :> Simp[F^a*Sqrt 
[Pi]*(Erf[(c + d*x)*Rt[(-b)*Log[F], 2]]/(2*d*Rt[(-b)*Log[F], 2])), x] /; Fr 
eeQ[{F, a, b, c, d}, x] && NegQ[b]
 

rule 2664
Int[(F_)^((a_.) + (b_.)*(x_) + (c_.)*(x_)^2), x_Symbol] :> Simp[F^(a - b^2/ 
(4*c))   Int[F^((b + 2*c*x)^2/(4*c)), x], x] /; FreeQ[{F, a, b, c}, x]
 

rule 5897
Int[Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] :> Simp[1/2   Int[E^ 
(a + b*x + c*x^2), x], x] - Simp[1/2   Int[E^(-a - b*x - c*x^2), x], x] /; 
FreeQ[{a, b, c}, x]
 

rule 5905
Int[((d_.) + (e_.)*(x_))*Sinh[(a_.) + (b_.)*(x_) + (c_.)*(x_)^2], x_Symbol] 
 :> Simp[e*(Cosh[a + b*x + c*x^2]/(2*c)), x] - Simp[(b*e - 2*c*d)/(2*c)   I 
nt[Sinh[a + b*x + c*x^2], x], x] /; FreeQ[{a, b, c, d, e}, x] && NeQ[b*e - 
2*c*d, 0]
 
3.1.12.4 Maple [C] (verified)

Result contains complex when optimal does not.

Time = 0.39 (sec) , antiderivative size = 49, normalized size of antiderivative = 0.94

method result size
risch \(\frac {{\mathrm e}^{-\frac {\left (1+2 x \right )^{2}}{4}}}{4}+\frac {\operatorname {erf}\left (\frac {1}{2}+x \right ) \sqrt {\pi }}{8}+\frac {{\mathrm e}^{\frac {\left (1+2 x \right )^{2}}{4}}}{4}+\frac {i \sqrt {\pi }\, \operatorname {erf}\left (i x +\frac {1}{2} i\right )}{8}\) \(49\)

input
int(x*sinh(1/4+x+x^2),x,method=_RETURNVERBOSE)
 
output
1/4*exp(-1/4*(1+2*x)^2)+1/8*erf(1/2+x)*Pi^(1/2)+1/4*exp(1/4*(1+2*x)^2)+1/8 
*I*Pi^(1/2)*erf(I*x+1/2*I)
 
3.1.12.5 Fricas [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 108 vs. \(2 (28) = 56\).

Time = 0.25 (sec) , antiderivative size = 108, normalized size of antiderivative = 2.08 \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {2 \, \cosh \left (x^{2} + x + \frac {1}{4}\right )^{2} + 4 \, \cosh \left (x^{2} + x + \frac {1}{4}\right ) \sinh \left (x^{2} + x + \frac {1}{4}\right ) + 2 \, \sinh \left (x^{2} + x + \frac {1}{4}\right )^{2} + \sqrt {\pi } {\left (\cosh \left (x^{2} + x + \frac {1}{4}\right ) \operatorname {erf}\left (x + \frac {1}{2}\right ) - \cosh \left (x^{2} + x + \frac {1}{4}\right ) \operatorname {erfi}\left (x + \frac {1}{2}\right ) + {\left (\operatorname {erf}\left (x + \frac {1}{2}\right ) - \operatorname {erfi}\left (x + \frac {1}{2}\right )\right )} \sinh \left (x^{2} + x + \frac {1}{4}\right )\right )} + 2}{8 \, {\left (\cosh \left (x^{2} + x + \frac {1}{4}\right ) + \sinh \left (x^{2} + x + \frac {1}{4}\right )\right )}} \]

input
integrate(x*sinh(1/4+x+x^2),x, algorithm="fricas")
 
output
1/8*(2*cosh(x^2 + x + 1/4)^2 + 4*cosh(x^2 + x + 1/4)*sinh(x^2 + x + 1/4) + 
 2*sinh(x^2 + x + 1/4)^2 + sqrt(pi)*(cosh(x^2 + x + 1/4)*erf(x + 1/2) - co 
sh(x^2 + x + 1/4)*erfi(x + 1/2) + (erf(x + 1/2) - erfi(x + 1/2))*sinh(x^2 
+ x + 1/4)) + 2)/(cosh(x^2 + x + 1/4) + sinh(x^2 + x + 1/4))
 
3.1.12.6 Sympy [F]

\[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\int x \sinh {\left (x^{2} + x + \frac {1}{4} \right )}\, dx \]

input
integrate(x*sinh(1/4+x+x**2),x)
 
output
Integral(x*sinh(x**2 + x + 1/4), x)
 
3.1.12.7 Maxima [B] (verification not implemented)

Leaf count of result is larger than twice the leaf count of optimal. 123 vs. \(2 (28) = 56\).

Time = 0.27 (sec) , antiderivative size = 123, normalized size of antiderivative = 2.37 \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{2} \, x^{2} \sinh \left (x^{2} + x + \frac {1}{4}\right ) - \frac {{\left (2 \, x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, \frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )}{4 \, {\left ({\left (2 \, x + 1\right )}^{2}\right )}^{\frac {3}{2}}} - \frac {{\left (2 \, x + 1\right )}^{3} \Gamma \left (\frac {3}{2}, -\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )}{4 \, \left (-{\left (2 \, x + 1\right )}^{2}\right )^{\frac {3}{2}}} - \frac {1}{16} \, e^{\left (\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )} + \frac {1}{16} \, e^{\left (-\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right )} + \frac {1}{4} \, \Gamma \left (2, \frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right ) + \frac {1}{4} \, \Gamma \left (2, -\frac {1}{4} \, {\left (2 \, x + 1\right )}^{2}\right ) \]

input
integrate(x*sinh(1/4+x+x^2),x, algorithm="maxima")
 
output
1/2*x^2*sinh(x^2 + x + 1/4) - 1/4*(2*x + 1)^3*gamma(3/2, 1/4*(2*x + 1)^2)/ 
((2*x + 1)^2)^(3/2) - 1/4*(2*x + 1)^3*gamma(3/2, -1/4*(2*x + 1)^2)/(-(2*x 
+ 1)^2)^(3/2) - 1/16*e^(1/4*(2*x + 1)^2) + 1/16*e^(-1/4*(2*x + 1)^2) + 1/4 
*gamma(2, 1/4*(2*x + 1)^2) + 1/4*gamma(2, -1/4*(2*x + 1)^2)
 
3.1.12.8 Giac [C] (verification not implemented)

Result contains complex when optimal does not.

Time = 0.28 (sec) , antiderivative size = 43, normalized size of antiderivative = 0.83 \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\frac {1}{8} \, \sqrt {\pi } \operatorname {erf}\left (x + \frac {1}{2}\right ) - \frac {1}{8} i \, \sqrt {\pi } \operatorname {erf}\left (-i \, x - \frac {1}{2} i\right ) + \frac {1}{4} \, e^{\left (x^{2} + x + \frac {1}{4}\right )} + \frac {1}{4} \, e^{\left (-x^{2} - x - \frac {1}{4}\right )} \]

input
integrate(x*sinh(1/4+x+x^2),x, algorithm="giac")
 
output
1/8*sqrt(pi)*erf(x + 1/2) - 1/8*I*sqrt(pi)*erf(-I*x - 1/2*I) + 1/4*e^(x^2 
+ x + 1/4) + 1/4*e^(-x^2 - x - 1/4)
 
3.1.12.9 Mupad [F(-1)]

Timed out. \[ \int x \sinh \left (\frac {1}{4}+x+x^2\right ) \, dx=\int x\,\mathrm {sinh}\left (x^2+x+\frac {1}{4}\right ) \,d x \]

input
int(x*sinh(x + x^2 + 1/4),x)
 
output
int(x*sinh(x + x^2 + 1/4), x)